#coding=utf-8
import os
from datetime import date,timedelta

import sign
def gen_dates(bdate, days):
    day = timedelta(days=1)
    for i in range(days):
        yield bdate + day * i

if __name__ == "__main__":
    bdate = date(2018, 10, 25)
    for d in gen_dates(bdate, 30):
        print d
        command = 'date -s "'+str(d)+' 15:30"'
        print command
        # 此处执行linux改服务器时间命令
        os.system(command)
        #执行签到接口
        sign.sign('17781108472')



